package com.zheng.shop.dao.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zheng.shop.dao.model.ShopProduct;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ShopProductMapper extends BaseMapper<ShopProduct> {
    List<Map<String, Object>> selectProductMap(@Param("search") String search, @Param("sort") String sort,
                                               @Param("offset") int offset, @Param("limit") int limit,
                                               @Param("categoryId") String category);

    int selectProductCount(@Param("search") String search, @Param("sort") String sort,
                           @Param("offset") int offset, @Param("limit") int limit, @Param("categoryId") String category);

    Map<String, Object> selectProduct(Integer productId);
}